package com.soda.service.impl;

import java.util.List;

import com.soda.bean.News;
import com.soda.bean.Notice;
import com.soda.dao.NewsDao;
import com.soda.dao.NoticeDao;
import com.soda.dao.impl.NewsDaoImpl;
import com.soda.dao.impl.NoticeDaoImpl;
import com.soda.service.NoticeService;
import com.soda.util.PageInfo;
import com.soda.util.SelectNewsInfo;
import com.soda.util.SelectNoticeInfo;

public class NoticeServiceImpl implements NoticeService{
	NoticeDao nod = new NoticeDaoImpl();


	//分页加条件查询

	public List<Notice> getNotices(SelectNoticeInfo sni, PageInfo pi) {

		return nod.getNotices(sni, pi);
	}
	//查询信息有几条

	public int getNoticeCount(SelectNoticeInfo sni) {
		// TODO Auto-generated method stub
		return nod.getNoticeCount(sni);
	}

	//删除

	public int deleteById(int id) {
		// TODO Auto-generated method stub
		return nod.deleteById(id);
	}
	
	//根据ID查信息
	
	public Notice showAllNotice(int id) {
		// TODO Auto-generated method stub
		return nod.showAllNotice(id);
	}
 //修改

	public int updateNotice(int id,int recommend, String neirong) {
			 
		return nod.updateNotice(id,recommend,neirong);
	}
//增加
	public int addNotice(Notice n) {
		 
		return nod.addNotice(n);
	}
//批量删除
	public int delAllNotice(String[] nids) {
		 
		return nod.delAllNotice(nids);
	}
	//导出
	 

	public List<Notice> exportNotice(String[] count) {
		// TODO Auto-generated method stub
		return nod.exportNotice(count);
	}
	
 

	public List<Notice> getSelectAll() {
		NoticeDao nd = new NoticeDaoImpl();
		// TODO Auto-generated method stub

		return nd.getSelectAll();
	}

	 


	 

	
	

}

